<?php

namespace longhu\library\pool;

use longhu\library\Pool;
use Predis\Client;
use think\App;

class RedisPool
{
    /**
     * @var App
     * 的应用
     */
    protected $app;

    /*
     *获取Redis的配置
     */
    protected $config;

    /**
     * @var
     * 池
     */
    protected $pool;

    public function  __construct(App $app)
    {
        $this->app = $app;
       // $this->config = $app->make("config");
        $this->init();
    }

    public function init()
    {
        $poolConfig = config('redis.predis_pool');
        $predis = new Client($poolConfig['parameters'], $poolConfig['options']);
        $predis->getConnection()->getPool();
    }
}